package models

import (
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql"
)

func init() {
	orm.RegisterDriver("mysql", orm.DRMySQL)
	orm.RegisterDataBase("default", "mysql", "root:123456@10.10.23.171:53306/test?charset=utf8")
}

func DbInsert(item Item) {
	var o = orm.NewOrm()
	o.Using("default")
	o.Insert(item)
}
